/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface MesOrderRoute extends BasicModel<MesOrderRoute> {
  modid?: string; // 订单子表ID
  operCode?: string; // 工序编码
  sortNum?: number; // 加工顺序
  bkey?: string; // 关键工序
  costType?: string; // 计价方式
  bout?: string; // 是否委外
  breport?: string; // 是否报工
  bcheck?: string; // 是否检验
  techLevel?: string; // 技能标准
  techCtrl?: string; // 技能控制
  reportType?: string; // 报工方式
  iprice?: number; // 计件单价
}

export const mesOrderRouteList = (params?: MesOrderRoute | any) =>
  defHttp.get<MesOrderRoute>({ url: adminPath + '/mo/route/mesOrderRoute/list', params });

export const mesOrderRouteListData = (params?: MesOrderRoute | any) =>
  defHttp.post<Page<MesOrderRoute>>({ url: adminPath + '/mo/route/mesOrderRoute/listData', params });

export const mesOrderRouteForm = (params?: MesOrderRoute | any) =>
  defHttp.get<MesOrderRoute>({ url: adminPath + '/mo/route/mesOrderRoute/form', params });

export const mesOrderRouteSave = (params?: any, data?: MesOrderRoute | any) =>
  defHttp.postJson<MesOrderRoute>({ url: adminPath + '/mo/route/mesOrderRoute/save', params, data });

export const mesOrderRouteDelete = (params?: MesOrderRoute | any) =>
  defHttp.get<MesOrderRoute>({ url: adminPath + '/mo/route/mesOrderRoute/delete', params });

export const mesOrderRouteAddRoute = (params?: MesOrderRoute | any) =>
  defHttp.post<MesOrderRoute>({ url: adminPath + '/mo/route/mesOrderRoute/addRoute', params });


export const mesOrderRouteSaveRoute = (params?: any) =>
  defHttp.postJson<MesOrderRoute>({ url: adminPath + '/mo/route/mesOrderRoute/saveRoute', params});
